package com.heubu.mall.controller;

import com.heubu.mall.service.ICategoryService;
import com.heubu.mall.vo.CategoryVo;
import com.heubu.mall.vo.ResponseVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author Wangchuang
 * @Date: 2022/5/5 22:30
 * @Version 1.0
 * @Description:
 */
@Slf4j
@RestController
public class CategoryController {
    
    @Autowired
    private ICategoryService categoryService;
    
    @GetMapping("/categories")
    public ResponseVo<List<CategoryVo>> selectAll() {
        return categoryService.selectAll();
    }
}
